#include <iostream>
#include <fstream>
#include <complex>

using namespace std;

/* run out.m first to get data */

int main(int argc, char ** argv){
  double a; 
  complex<double> *b;
  b = new complex<double>[2];
  ifstream fh("in.dat", ios::in|ifstream::binary);
  if( fh.is_open() )
    cout << "Opened!" << endl;
  fh.read((char*)&a,sizeof(double));
  fh.read((char*)b,sizeof(complex<double>)*2);
  cout << a << endl;
  cout << b[0] << endl;
  cout << b[1] << endl;
  cout << "-1/10 = " << -1/10 << endl;
  fh.close();
  delete[] b;
  delete[] b;
  return 1;
}
